package com.yjt.yjtrouting.common.dao;

import java.util.ArrayList;
import java.util.Collection;

import org.hibernate.criterion.MatchMode;
import org.hibernate.criterion.Order;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import com.yjt.common.easyui.datagrid.DataGridDAOImpl;
import com.yjt.common.hibernate.base.DaoException;
import com.yjt.yjtrouting.common.bean.domain.InfoTxnLogMapping;

@Service(InfoTxnLogMappingDao.BEAN_PACKAGE_NAME)
public class InfoTxnLogMappingDao extends DataGridDAOImpl {
	private static Logger logger = LoggerFactory.getLogger(InfoTxnLogMappingDao.class);

	public static final String BEAN_PACKAGE_NAME = "com.yjt.yjtrouting.common.dao.InfoTxnLogMappingDao";

	public InfoTxnLogMappingDao(){

	}

	public InfoTxnLogMapping getBeanById(String id) throws DaoException {
		return (InfoTxnLogMapping) getBeanById(BEAN_PACKAGE_NAME, id, false);
	}
	
	public InfoTxnLogMapping getBeanByIdForUpdate(String id) throws DaoException {
		return (InfoTxnLogMapping) getBeanById(BEAN_PACKAGE_NAME, id, true);
	}

	@SuppressWarnings("rawtypes")
	public Collection getAll() throws DaoException {
		return getAll(BEAN_PACKAGE_NAME);
	}

	@SuppressWarnings("rawtypes")
	public InfoTxnLogMapping getBeanByParams(String hqlName,ArrayList paraList) throws DaoException{
		return (InfoTxnLogMapping) getProtoBeanByParams(hqlName,paraList);
	}

	public InfoTxnLogMapping getBeanByBean(InfoTxnLogMapping bean, MatchMode mode) throws DaoException{
		return (InfoTxnLogMapping) getProtoBeanByBean(bean, mode);
	}
	
	public InfoTxnLogMappingDao setOrder(Order order){
		return (InfoTxnLogMappingDao)super.addOrder(order);
	}
}
